package org.example.elmfront.service;

// OrderService 接口

import org.example.elmfront.entity.Order;
import org.example.elmfront.entity.OrderItem;
import java.util.List;


public interface OrderService {
    Long createOrder(Order order);


    Long createOrderFromItems(List<OrderItem> orderItems);

    Order getOrderById(Long id);


    void updateOrderStatus(Long id, Integer status);


    void deleteOrder(Long id);


    void addOrderItem(OrderItem orderItem);


    List<OrderItem> getOrderItemsByOrderId(Long orderId);


    int countOrders();

    void confirmOrder(List<OrderItem> orderItems);

    void cancelOrder(List<OrderItem> orderItems);


}